USE [OurMud]
GO

/****** Object:  StoredProcedure [dbo].[mspGetInstructionsBySyntax]    Script Date: 03/02/2014 11:29:18 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
ALTER PROCEDURE [dbo].[mspGetInstructionsBySyntax]
	-- Add the parameters for the stored procedure here
	@SyntaxID int
	
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    -- Insert statements for procedure here
	SELECT 
		Instr.ID,
		Instr.fkSyntax,
		Instr.sequence,
		Instr.nextOnSuccess,
		Instr.nextOnFail, 
		Instr.note,
		Instr.instruction,
		SysIn.ID,
		SysIn.regExpression,
		SysIn.note
	FROM tblInstructions As Instr
	Inner Join lkuSysInstr AS SysIn
		ON Instr.fkSysInstr = SysIn.ID

	WHERE Instr.fkSyntax = @SyntaxID
END


GO

